<?php
include '../vendor/autoload.php';
$data = [
    ['id' => 1, 'parent_id' => 0, 'name' => '系统'],
    ['id' => 2, 'parent_id' => 0, 'name' => '订单'],
    ['id' => 11, 'parent_id' => 1, 'name' => '设置'],
    ['id' => 111, 'parent_id' => 11, 'name' => '全局设置'],
    ['id' => 112, 'parent_id' => 11, 'name' => '第三方设置'],
    ['id' => 21, 'parent_id' => 2, 'name' => '国内订单'],
    ['id' => 22, 'parent_id' => 2, 'name' => '国外订单'],
    ['id' => 211, 'parent_id' => 21, 'name' => '订单列表'],
    ['id' => 212, 'parent_id' => 21, 'name' => '物流信息'],
];

$tree = new \Aug\Tools\Tree($data);

// $res = $tree->getTreeArray();
$res = $tree->getOptions();

print_r($res);